<%@ page import="demo1.pojo.goods" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: PC
  Date: 2024/3/22
  Time: 9:59
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>查看商品</title>
</head>
<body>
<input type="button" value="添加商品" id="add"><br>
<hr>
<table border="1" cellspacing="0" width="80%">
    <tr>
        <th>商品名称</th>
        <th>商品信息</th>
        <th>商品价格</th>
        <th>商品库存</th>
        <th>商品销量</th>
        <th>商品种类</th>
        <th>商品状态</th>
        <th>商品上架时间</th>
    </tr>

    <c:forEach items="${goodsList}" var="good">
        <tr align="center">
            <td>${good.goodsName}</td>
            <td>${good.goodsMessage}</td>
            <td>${good.price}</td>
            <td>${good.goodsNum}</td>
            <td>${good.goodsXiaoLiang}</td>
            <td>${good.goodsType}</td>
            <td>${good.statue}</td>
            <td>${good.time}</td>
            <td><a href="/logindemo2/modifyGoods?goodsID=${good.goodsID}">修改</a> <a href="/logindemo2/deleteGoods?goodsID=${good.goodsID}"> 删除</a> <a href="/logindemo2/modifyGoodsStatue1?goodsID=${good.goodsID}"> 调整商品上下架</a> <a href="/logindemo2/showGoodsXiaoLiang?goodsID=${good.goodsID}"> 查看商品销量</a><a href="/logindemo2/modifyGoodsNum1?goodsID=${good.goodsID}"> 对商品的库存管理</a></td>
        </tr>
    </c:forEach>


</table>
<script>
    document.getElementById("add").onclick = function (){
        location.href = "addGoods.jsp";
    }
</script>
<form action="showUserMai.jsp" method="post">
    <input type="submit" value="返回主界面"><br>
</form>
</body>
</html>
